package com.yunhe.common.model.base;

import com.yunhe.common.constant.LanguageConsts;
import com.yunhe.common.i18n.I18nMessageUtil;
import com.yunhe.common.i18n.LanguageHolder;

/**
 * @title: Scenarios
 * @Author Chen Lun
 * @Date: 2021/1/19 16:59
 */
public class ScenariosDTO extends StatusType {
    private Long id;
    private String title;

    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public String getTitle() {
        if (LanguageConsts.TYPE.EN.value().equals(LanguageHolder.getLanguage())) {
            return I18nMessageUtil.getMessage(LanguageHolder.getLanguage(), title);
        } else {
            return title;
        }
    }
}
